package zhang.lao.pojo.console.map;/**
 * Created by zhangqin on 2017/8/28.
 */

import zhang.lao.build.tool.CoordinateConversion;
import zhang.lao.build.tool.Point;

/**
 * 坐标点
 *
 * @author
 * @create 2017-08-28 17:55
 **/
public class PointResp<T> {

    private double lat;
    private double lng;
    private String icon;
    private T data;

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public double getLat() {
        return  point().getLat();
    }

    public void setLat(double lat) {
        this.lat = lat;
    }

    public double getLng() {
        return  point().getLng();
    }

    public void setLng(double lng) {
        this.lng = lng;
    }

    public String getIcon() {
        return icon;
    }

    public void setIcon(String icon) {
        this.icon = icon;
    }

    public PointResp() {
    }

    public PointResp(double lat, double lng, String icon, T data) {
        this.lat = lat;
        this.lng = lng;
        this.icon = icon;
        this.data = data;
    }

    private Point point(){
        Point point = CoordinateConversion.wgs_gcj_encrypts(lat, lng);
        return point;
    }
}
